﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class CampusAgent : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Label_mastertime.Text = DateTime.Now.ToString();

        if ((string)Session["userId"] == null || (string)Session["login"] != "havelogin" || (string)Session["usertype"] != "agentsrub")
        {

            Response.Redirect("~/LoginPage/login.aspx");
          
        }

        LinkButton_username.Text ="用户：" +(String)Session["userId"];
    }

    protected void LinkButton_exit_Click(object sender, EventArgs e)
    {

       Session["userId"] = null;
       Session["login"] = null;
        

            Response.Redirect("~/LoginPage/login.aspx");

        
    }
}
